A chip like it is included in a chip card may process confidential data such as cryptographic keys used for secure transmission. Such data should typically be protected against modification, too. This may for example be achieved by means of an error detection code including the calculation of a checksum. At the same time, however, it is desirable to avoid that an attacker can gain information about the confidential data by exploiting side-channel leakage occurring during the calculation of the checksum.